{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "from sklearn.model_selection import train_test_split\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn.preprocessing import StandardScaler"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "data = pd.read_csv('MLDataset.csv')\n",
    "data = data.drop('Unnamed: 0',axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "scaler = StandardScaler()\n",
    "scaler.fit(data)\n",
    "data = scaler.transform(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(20000, 7)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "X = data[:,0:3]\n",
    "Y = data[:,3:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "X_train,X_test,Y_train,Y_test = train_test_split(X,Y,test_size=0.3,random_state=0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.svm import SVR"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Finding the Best Degree\n",
    "Rscore = []\n",
    "for i in range(2,8):\n",
    "    Model = SVR(degree=i,kernel='poly')\n",
    "    Model.fit(X_train,Y_train[:,0])\n",
    "    y_pred = Model.predict(X_test)\n",
    "    val = Model.score(X_test,Y_test[:,0])\n",
    "    Rscore.append(val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x1932972c220>]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAdGUlEQVR4nO3da3BU95nn8e+jOwiQEAgQuiDZYBvwBYMQOHYm2cSxwXaCEyfxJTa1SapcrthbSc1ms5mq3Rd5MVWzb6ZmU5WKyzOT2gXsAI6dhDgknty9mUEgyVwMwRcMSK2LkUBICIQu3Xr2RTdYKMI00K3Tl9+nqkvqc/5H/RwQvz6c8+/nmLsjIiKZKyfoAkREJLkU9CIiGU5BLyKS4RT0IiIZTkEvIpLh8oIuYDJz58712traoMsQEUkbLS0tJ929fLJ1KRn0tbW1NDc3B12GiEjaMLPWy63TqRsRkQynoBcRyXAKehGRDKegFxHJcAp6EZEMp6AXEclwCnoRkQyXkvPoRSR7dZ8ZYvexXt7vOUtBXg6FebkU5edQlJdLYexrUX502cV1+bkU5uVQGFtekJuDmQW9KylDQS8igeroO8+eY6fYfbSX3cd6OXby3HX/TDMozIu+AVz6BhF9M7i47uL3H76BfLgu+kZSmD9x7IQ3mXHb5eSk5puLgl5Epoy709Y7yO5jvbFgP0X76fMAzCrKo6GujCcaamioK2PZwllExpzh0TGGwhGGRiMMjY4xHI5+HRqNMBweiy2PMBQeY3jcskvWTdhuYChMz8DwpGPHruNeTAW5ORRO+J/GxDeFwotf//p/JbOK8nliTU2C/rQ/pKAXkaRxd97vOcfuY6fYEwv3D84MAVBWXEBDbRlfv6eOhroyblkwi9wJR8T5uVCUn0sJ+VNWb3jML745DF3yxhEZ96Yz8Q1i4hvQpWMvrOsbHB233YdvTCORMQDKZxYq6EUktY2NOe92D7D7aG802I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cYC7iOqeTAv5lZi5k9ncgfnClBb5Msy/ijnmxlZjOAV4BvufuZoOtJNnePuPsKoApoMLOMPk1nZg8B3e7eEnQtU+xud18JrAeejZ2aTYhMCfp2oHrc8yqgM6BaJIli56lfAV5091eDrmcquXsf8EdgXbCVJN3dwOdi56y3Ap8ysy3BlpR87t4Z+9oN/JToKemEyJSgbwKWmFmdmRUAjwE7Aq5JEix2YfJfgcPu/o9B1zMVzKzczEpj308D7gXeDrSoJHP3v3P3KnevJfpv+ffu/mTAZSWVmRXHJhhgZsXAfUDCZtNlRNC7exh4Dnid6AW67e5+KNiqks/MfgzsAm42s3Yz+3rQNSXZ3cBTRI/w9sUeDwRdVJJVAH8wswNED2h+4+5ZMd0wy8wH/mxm+4E9wC/d/deJ+uEZMb1SREQuLyOO6EVE5PIU9CIiGU5BLyKS4RT0IiIZTkEvIpLhFPQiIhlOQS8ikuH+P2p1bCcAQjpuAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(Rscore)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[-0.0030147343207596045,\n",
       " 0.03317497108305045,\n",
       " 0.03901886347973771,\n",
       " 0.04221535416557154,\n",
       " 0.04590487157459633,\n",
       " 0.04539204845628342]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Rscore"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Finding the Best Degree\n",
    "Rscore = []\n",
    "for i in range(2,8):\n",
    "    Model = SVR(degree=6,kernel='poly',coef0=i)\n",
    "    Model.fit(X_train,Y_train[:,0])\n",
    "    y_pred = Model.predict(X_test)\n",
    "    val = Model.score(X_test,Y_test[:,0])\n",
    "    Rscore.append(val)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
